<?php
namespace app\constant;

class ProductBackgroundStatus
{
    // 状态枚举
    const PREPROCESSING = 10;   // 去背景中
    const GENERATING    = 1;    // 背景生成中
    const SUCCESS       = 2;    // 成功
    const FAILED        = 3;    // 失败

    public static function getText(int $status): string
    {
        $map = [
            self::PREPROCESSING => '去背景处理中',
            self::GENERATING    => '图片生成中',
            self::SUCCESS       => '成功',
            self::FAILED        => '失败',
        ];
        return $map[$status] ?? '未知';
    }
}


